# Maintainer: John Butera <john@jbutera.net>

_realname=cdecl-blocks
pkgname=cdecl
pkgver=2.5
pkgrel=1
pkgdesc="A program for encoding and decoding C (or C++) type declarations"
arch=('i686' 'x86_64')
url="http://cdecl.org/"
options=('strip' 'staticlibs' '!makeflags')
license=('public-domain')
depends=("libedit")
makedepends=("gcc" 'make' 'libedit-devel' 'flex' 'bison')
source=("http://cdecl.org/files/cdecl-blocks-2.5.tar.gz"
        "build.patch")
md5sums=('c1927e146975b1c7524cbaf07a7c10f8'
         'cfb838ce1e581c0ae0fe0195a69dfa8d')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
  patch -p1 -i "${srcdir}/build.patch"
}

build() {
  cd ${srcdir}/${_realname}-${pkgver}
  make
}

package() {
  cd ${srcdir}/${_realname}-${pkgver}
  make PREFIX="${pkgdir}" install
}
